package com.authine.cloudpivot.ext.enums.order.transfer;


public enum MemberPurchaseOrderEnum {

    /**
     * 采购订单状态
     */

    ALL(0, "全部"),
    NEW(1, "新建"),
    PAYMENT(2,"待付款"),
    PARTIAL(3,"部分付款"),
    PAYED(4,"已付款"),
    DISMISSED(5,"已驳回"),
    PENDING_CONFIRM(6,"待财务确认"),
    CANCEL(7,"已作废"),
    Close(8,"关闭");


    public Integer id;
    public String text;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    private MemberPurchaseOrderEnum(Integer id, String text) {

        this.id = id;
        this.text = text;
    }

    public static MemberPurchaseOrderEnum get(Integer code) {

        for (MemberPurchaseOrderEnum c : MemberPurchaseOrderEnum.values()) {
            if (c.id.toString().equals(code.toString())) {
                return c;
            }
        }
        return null;
    }

    @Override
    public String toString() {
        return text;
    }



}
